package homework.day07.bean;

/**
 * @author ThinkBook
 */
public class Cylinder extends Circle{
    private double height;
    private double SurfaceArea;
    private double Volume;
    public Cylinder(int radius,int height){
        super(radius);
        this.height = height;
    }
    @Override
    public double getSurfaceArea(){
        SurfaceArea = super.getSurfaceArea()*2+2*super.getCircumference()*height;
        return SurfaceArea;
    }
    @Override
    public String toString(){
        return "Cylinder{radius=" + getRadius() + ", height=" + height + "}";
    }

    public double getVolume(){
        Volume = super.getSurfaceArea()*height;
        return Volume;
    }

}
